package com.dhcc.bpm.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.system.entity.Dept;
import com.dhcc.bpm.modules.system.entity.UserDept;
import com.dhcc.bpm.modules.system.vo.DeptVO;
import com.dhcc.bpm.modules.system.vo.DeptVO2;

import java.util.List;

/**
 * @ClassName DeptMapper
 * @Description Mapper 接口
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
public interface DeptMapper extends BaseMapper<Dept> {

	/**
	 * @Description 自定义分页
	 * @Author sjm
	 * @Date 10:12 2020/2/22 0022
	 * @param page
	 * @param dept
	 * @return java.util.List<com.dhcc.bpm.modules.system.vo.DeptVO>
	 **/
	List<DeptVO> selectDeptPage(IPage page, DeptVO dept);

	/**
	 * @Description 获取树形节点
	 * @Author sjm
	 * @Date 10:12 2020/2/22 0022
	 * @param tenantId
	 * @return java.util.List<com.dhcc.bpm.modules.system.vo.DeptVO>
	 **/
	List<DeptVO> tree(String tenantId);

	/**
	 * @Description 获取部门名
	 * @Author sjm
	 * @Date 10:12 2020/2/22 0022
	 * @param ids
	 * @return java.util.List<java.lang.String>
	 **/
	List<String> getDeptNames(String[] ids);

	boolean removeByIds(String[] ids);


	List<DeptVO2> queryDeptByUserId(Long userId);
	List<DeptVO2> queryDeptAll();
}
